package com.ls.service.sysUser;

import com.ls.pojo.SysUser;

import java.util.List;

public interface SysUserService {
	/**
	 * 增加用户信息
	 * @param user
	 * @return
	 */
	public boolean add(SysUser user) throws Exception;
	
	/**
	 * 用户登录
	 * @param account
	 * @param userPassword
	 * @return
	 */
	public SysUser login(String account, String userPassword) throws Exception;

	/**
	 * 根据条件查询用户列表
	 * @param queryRealName
	 * @param queryRoleId
	 * @return
	 */
	public List<SysUser> getUserList(String queryRealName, Integer queryRoleId, Integer currentPageNo, Integer pageSize) throws Exception;

	/**
	 * 根据条件查询用户表记录数
	 * @param realName
	 * @param roleId
	 * @return
	 */
	public int getUserCount(String realName, Integer roleId) throws Exception;

	/**
	 * 根据ID查找user
	 * @param id
	 * @return
	 */
	public SysUser getUserById(Integer id) throws Exception;

	/**
	 * 修改用户信息
	 * @param user
	 * @return
	 */
	public boolean update(SysUser user) throws Exception;

	/**
	 * 根据userId修改密码
	 * @param id
	 * @param pwd
	 * @return
	 */
	public boolean updatePwd(Integer id, String pwd) throws Exception;

	/**
	 * 根据用户账号查询用户信息
	 * @param account
	 * @return
	 */
    SysUser getByAccount(String account) throws Exception;

	/**
	 * 删除用户
	 * @param id
	 * @return
	 */
	public boolean deleteById(Integer id) throws Exception;
}
